package com.platform.framework.serviceimpl.wxpay;


import org.springframework.stereotype.Service;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;

import com.platform.framework.dao.wxpay.WxRefundReturnInfoMybatisDao;
import com.platform.framework.entity.wxpay.WxRefundReturnInfo;
import com.platform.framework.serviceinf.wxpay.WxRefundReturnInfoService;

@Service("wxRefundReturnInfoService")
public class WxRefundReturnInfoServiceImpl implements WxRefundReturnInfoService{

	@Autowired
	private WxRefundReturnInfoMybatisDao wxRefundReturnInfoMybatisDao;

	@Override
	public void saveOrUpdate(WxRefundReturnInfo wxRefundReturnInfo) {
		// TODO Auto-generated method stub
		if (wxRefundReturnInfo != null && wxRefundReturnInfo.getId() == null) {
			wxRefundReturnInfo.setCreateDate(new Date());
			wxRefundReturnInfoMybatisDao.save(wxRefundReturnInfo);
		} else if (wxRefundReturnInfo != null && wxRefundReturnInfo.getId() != null) {
			wxRefundReturnInfo.setLastUpdateDate(new Date());
			wxRefundReturnInfoMybatisDao.update(wxRefundReturnInfo);
		}
	}


}

